<template>
	<view>
		<text class="h8" selectable user-select v-if="showType==='text'">{{ message }}</text>
        <web-view :src="message" v-else/>
	</view>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { onLoad } from '@dcloudio/uni-app';
import { useStorage } from "@/utils/storage";
const message = ref('');
const showType = ref('text');
onLoad((options:any) => {
    if (options.view) {
        showType.value = options.view;
    }
	const ScanResult = useStorage().get('ScanResult');
	if (ScanResult) {
		message.value = ScanResult;
	}
})
</script>
<style lang="scss" scoped>
</style>